#ifndef HASH_H
#define HASH_H

#include "config.h"


// 1023 is binary 1111111111
#define MAP_SIZE 1023

typedef struct node {
    char *data;
    enum symbol_type type;
    struct node *next;
}Link;

Link **init_link(int size);

unsigned int elfhash(const char *str);

void insert(Link **link, const char *data, enum symbol_type type);

void show_node(struct node *node);

void show_link(Link **link);

enum symbol_type search(Link **link, const char *data);

void destroy_node(struct node *node);

void destroy_link(Link **link, int size);

#endif